package com.zeng.webmvc;

import com.zeng.webmvc.controller.Controller;

import java.lang.reflect.Method;
import java.util.Set;

/**
 * @author zyb
 * @date 2021-03-02 22:12
 */
public class HandlerMethodInfo {
    private String requestPath;
    private Set<String> httpMethods;
    private Controller controller;
    private Method method;

    public HandlerMethodInfo(String requestPath, Set<String> httpMethods, Controller controller, Method method) {
        this.requestPath = requestPath;
        this.httpMethods = httpMethods;
        this.controller = controller;
        this.method = method;
    }

    public String getRequestPath() {
        return requestPath;
    }

    public Set<String> getHttpMethods() {
        return httpMethods;
    }

    public Controller getController() {
        return controller;
    }

    public Method getMethod() {
        return method;
    }

    @Override
    public String toString() {
        return "HandlerMethodInfo{" +
                "requestPath='" + requestPath + '\'' +
                ", httpMethods=" + httpMethods +
                ", controller=" + controller +
                ", method=" + method +
                '}';
    }
}
